package com.lin.cms.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import com.lin.cms.criteria.SiteFlowCriteria;
import com.lin.cms.domain.SiteFlow;
import com.lin.cms.web.statistic.CmsStatistic.TimeRange;

public interface SiteFlowMapper{
	
	SiteFlow selectByPrimaryKey(Integer flowId);
	
	List<SiteFlow> selectByCriteria(SiteFlowCriteria criteria);
	
	int deleteByPrimaryKey(Integer flowId);
	
	int deleteByCriteria(SiteFlowCriteria criteria);
	
	int insert(SiteFlow siteFlow);
	
	int updateByPrimaryKeySelective(SiteFlow siteFlow);
	
	int updateByPrimaryKey(SiteFlow siteFlow);
	
	List<SiteFlow> selectByPage(SiteFlowCriteria criteria,RowBounds bounds);
	 
	int countByCriteria(SiteFlowCriteria criteria);
	
	int getPvCountByTimeRange(@Param("siteId") Integer siteId, @Param("timeRange") TimeRange timeRange);
	
	int getUniqueIpCountByTimeRange(@Param("siteId") Integer siteId,  @Param("timeRange") TimeRange timeRange);
	
	int getUniqueVisitorCountByTimeRange(@Param("siteId") Integer siteId, @Param("timeRange") TimeRange timeRange);
    
}
